package com.yidu.labyrinth.main;

import javax.persistence.*;
import java.sql.Date;
import java.util.Objects;
import java.util.Set;

/**
 * @描述：
 * @ClassName:labyrinth
 * @backage:com.yidu.labyrinth.main
 * @Date:2019 2019/9/25 9:24
 * @Author:易嵘
 **/
@SuppressWarnings("ALL")
@Entity
public class LabyrinthUserEntity {
    private String userId; //用户id
    private String userName; // 用户名
    private String userPwd; // 用户密码
    private String userPhone; // 用户手机
    private String userMail; // 用户邮箱
    private int userResult; //是否有效
    private Long userSort; // 排序
    private Date userCreateDate; //创建时间
    private String userCreateUser; // 创建人
    private Set<LabyrinthRoleOrUserEntity> labyrinthRoleOrUserEntitySet;

    public Set<LabyrinthRoleOrUserEntity> getLabyrinthRoleOrUserEntitySet() {
        return labyrinthRoleOrUserEntitySet;
    }

    public void setLabyrinthRoleOrUserEntitySet(Set<LabyrinthRoleOrUserEntity> labyrinthRoleOrUserEntitySet) {
        this.labyrinthRoleOrUserEntitySet = labyrinthRoleOrUserEntitySet;
    }

    @Id
    @Column(name = "USER_ID")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "USER_NAME")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Basic
    @Column(name = "USER_PWD")
    public String getUserPwd() {
        return userPwd;
    }

    public void setUserPwd(String userPwd) {
        this.userPwd = userPwd;
    }

    @Basic
    @Column(name = "USER_PHONE")
    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    @Basic
    @Column(name = "USER_MAIL")
    public String getUserMail() {
        return userMail;
    }

    public void setUserMail(String userMail) {
        this.userMail = userMail;
    }

    @Basic
    @Column(name = "USER_RESULT")
    public int getUserResult() {
        return userResult;
    }

    public void setUserResult(int userResult) {
        this.userResult = userResult;
    }

    @Basic
    @Column(name = "USER_SORT")
    public Long getUserSort() {
        return userSort;
    }

    public void setUserSort(Long userSort) {
        this.userSort = userSort;
    }

    @Basic
    @Column(name = "USER_CREATE_DATE")
    public Date getUserCreateDate() {
        return userCreateDate;
    }

    public void setUserCreateDate(Date userCreateDate) {
        this.userCreateDate = userCreateDate;
    }

    @Basic
    @Column(name = "USER_CREATE_USER")
    public String getUserCreateUser() {
        return userCreateUser;
    }

    public void setUserCreateUser(String userCreateUser) {
        this.userCreateUser = userCreateUser;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LabyrinthUserEntity that = (LabyrinthUserEntity) o;
        return Objects.equals(userId, that.userId) &&
                Objects.equals(userName, that.userName) &&
                Objects.equals(userPwd, that.userPwd) &&
                Objects.equals(userPhone, that.userPhone) &&
                Objects.equals(userMail, that.userMail) &&
                Objects.equals(userResult, that.userResult) &&
                Objects.equals(userSort, that.userSort) &&
                Objects.equals(userCreateDate, that.userCreateDate) &&
                Objects.equals(userCreateUser, that.userCreateUser);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userId, userName, userPwd, userPhone, userMail, userResult, userSort, userCreateDate, userCreateUser);
    }
}
